package com.zhixing.pay.domain.dto;

import com.zhixing.pay.domain.enums.TransactionType;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import java.time.YearMonth;
import static com.zhixing.common.constant.Constant.DEFAULT_PAGE;
import static com.zhixing.common.constant.Constant.DEFAULT_PAGE_SIZE;

@Data
public class TransactionQueryParams {

    /**
     * 页码
     * @default 1
     */
    private Integer page = DEFAULT_PAGE;

    /**
     * 每页条数
     * @default 10
     */
    private Integer pageSize = DEFAULT_PAGE_SIZE;

    /**
     * 钱包id
     * @example 1
     */
    @NotNull(message = "钱包id不能为空")
    private Integer walletId;

    /**
     * 交易类型：0-收入，1-支出，未传表示全部
     * @example null
     */
    private TransactionType transactionType;

    /**
     * 年月，格式：yyyy-MM
     * @example 2025-01
     */
    @NotNull(message = "年月不能为空")
    private YearMonth yearMonth;
}
